
<%
tb.uni.forEach(field=>{
%>
	
	/**
	* 根据唯一索引查询
	*/
	@ResponseBody
	@GetMapping("by_<%-under2Pascl(field.COLUMN_NAME)%>")
	public Object findBy<%-under2Pascl(field.COLUMN_NAME)%>(@RequestParam <%-field.JavaType%> <%-under2Camel(field.COLUMN_NAME)%>){
		try {
			<%-className%> <%-tb.camel%> = <%-tb.camel%>Service.findBy<%-under2Pascl(field.COLUMN_NAME)%>(<%-under2Camel(field.COLUMN_NAME)%>);
			return <%-tb.camel%>;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "";
		
	}

	/**
	* 根据唯一索引删除
	*/
	@ResponseBody
	@GetMapping("del_<%-under2Pascl(field.COLUMN_NAME)%>")
	public Object deleteBy<%-under2Pascl(field.COLUMN_NAME)%>(@RequestParam <%-field.JavaType%> <%-under2Camel(field.COLUMN_NAME)%>){
		try {
			return <%-tb.camel%>Service.deleteBy<%-under2Pascl(field.COLUMN_NAME)%>(<%-under2Camel(field.COLUMN_NAME)%>);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "";
		
	}
<%
});
%>
<%
tb.pri.forEach(field=>{
%>

	/**
	* 根据主键删除
	*/
	@ResponseBody
	@GetMapping("del_<%-under2Pascl(field.COLUMN_NAME)%>")
	public Object deleteBy<%-under2Pascl(field.COLUMN_NAME)%>(@RequestParam <%-field.JavaType%> <%-under2Camel(field.COLUMN_NAME)%>){
		try {
			return <%-tb.camel%>Service.deleteBy<%-under2Pascl(field.COLUMN_NAME)%>(<%-under2Camel(field.COLUMN_NAME)%>);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return "";
		
	}
<%
});
%>

